package com.gwt.tirso.gymkhana.client;

import java.io.Serializable;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@SuppressWarnings("serial")
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Person implements Serializable{
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent
	private String name;
	@Persistent
	private int age;
	@Persistent
	private String email;
	@Persistent
	private String nick;
	@Persistent
	private String password;
	@Persistent
	private String country;
	@Persistent
	private String city;
	
	/*@Persistent(mappedBy = "author")
	private List<Gymkhana> lg;
	
	public void addGymkhana(Gymkhana g){
		g.setAuthor(this);
		if(this.getLg()==null){
			lg = new ArrayList<Gymkhana>();
		}
		lg.add(g);
	}*/
	
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getNick() {
		return nick;
	}
	public void setNick(String nick) {
		this.nick = nick;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getEmail() {
		return email;
	}
	/*public void setLg(List<Gymkhana> lg) {
		this.lg = lg;
	}
	public List<Gymkhana> getLg() {
		return lg;
	}*/
	
}
